import type { typeItem } from '../models/cateGoryModel';
import instance from '../utils/request';

interface data<T> {
	status: number;
	msg: string;
	data: T;
}

export const getTypeList = (): Promise<typeItem[]> => {
	return instance.get('/category/list');
};

export const addCateGoryApi = (obj: typeItem) => {
	return instance.post('/category/save', obj);
};

export const editCateGoryApi = (obj: typeItem) => {
	return instance.put('/category/update', obj);
};
